-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix WiFi allocation in SPIRAM on ESP32 and ESP32-S3 #82870
Fix WiFi allocation in SPIRAM on ESP32 and ESP32-S3 #82870
Conversation
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
e309224
to
dd178e7
Compare
dd178e7
to
3a8267a
Compare
Fix allocations of large buffers if SPIRAM and WiFi alloc to SPIRAM are both enabled. Signed-off-by: Marek Matej <[email protected]>
Fix the allocations if the SPIRAM and WiFi alloc to SPIRAM are both enabled. Signed-off-by: Marek Matej <[email protected]>
Rename psram.c -> esp_psram.c to align with the naming conventions. Signed-off-by: Marek Matej <[email protected]>
3a8267a
to
fa55140
Compare
#ifdef CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM | ||
*(EXCLUDE_FILE( | ||
*libdrivers__wifi.a:* | ||
*libsubsys__net__l2__ethernet.a:* | ||
*libsubsys__net__lib__config.a:* | ||
*libsubsys__net__ip.a:* | ||
*libsubsys__net.a:* ) .noinit) | ||
*(EXCLUDE_FILE( | ||
*libdrivers__wifi.a:* | ||
*libsubsys__net__l2__ethernet.a:* | ||
*libsubsys__net__lib__config.a:* | ||
*libsubsys__net__ip.a:* | ||
*libsubsys__net.a:* ) .noinit.*) | ||
#else | ||
*(.noinit) | ||
*(.noinit.*) | ||
. = ALIGN (8); | ||
#endif /* CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM */ | ||
__dram_noinit_end = ABSOLUTE(.); | ||
. = ALIGN (4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is something wrong with this logic. In case CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM
is defined, it should only exclude the net/wifi
stuff. Currently, it is also not adding .noinit
data at all. Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It excludes the noinit
and noinit.*
sections for object files matching the pattern. If the SPIRAM alloc is not defined it spills noinit
and noinit.*
without exceptions.
This PR fixes the ESP32 and ESP32S3 linker in case when CONFIG_SPIRAM and CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM are both enabled. This frees the space in the internal DRAM.
Fixes #74675